<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>简单计算器</title>
    <link rel="stylesheet" href="css/cul.css" />
  </head>
  <body>
    <div class="calculator">
      <input type="text" id="display" disabled />
      <div class="buttons">
        <div class="numbers">
          <button class="number" onclick="appendToDisplay(this.innerText)">
            1
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            2
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            3
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            4
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            5
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            6
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            7
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            8
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            9
          </button>
          <button class="number" onclick="appendToDisplay(this.innerText)">
            0
          </button>
          <button onclick="clearDisplay()">C</button>
          <button class="operator" onclick="calculate(this.innerText)">
            %
          </button>
          <button class="backspace" onclick="backspace()">←</button>
        </div>
        <div class="operators">
          <button class="operator" onclick="calculate(this.innerText)">
            +
          </button>
          <button class="operator" onclick="calculate(this.innerText)">
            -
          </button>
          <button class="operator" onclick="calculate(this.innerText)">
            X
          </button>
          <button class="operator" onclick="calculate(this.innerText)">
            /
          </button>
          <button onclick="calculateResult()">=</button>
        </div>
      </div>
    </div>
    <script src="js/cul.js"></script>
  </body>
</html>
